home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / QD3DIO.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  30.5 KB  |  1,121 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DIO.a
  3. ;
  4. ;    Contains:    QuickDraw 3D IO API                                                
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__QD3DIO__') = 'UNDEFINED' THEN
  19. __QD3DIO__ SET 1
  20.  
  21.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  22.     include 'QD3D.a'
  23.     ENDIF
  24.  
  25.     IF &TYPE('__QD3DDRAWCONTEXT__') = 'UNDEFINED' THEN
  26.     include 'QD3DDrawContext.a'
  27.     ENDIF
  28.     IF &TYPE('__QD3DVIEW__') = 'UNDEFINED' THEN
  29.     include 'QD3DView.a'
  30.     ENDIF
  31.  
  32. ; ******************************************************************************
  33. ; **                                                                              **
  34. ; **                                    Basic Types                                 **                                                    
  35. ; **                                                                              **
  36. ; ****************************************************************************
  37.  
  38. ; typedef unsigned char                 TQ3Uns8
  39.  
  40. ; typedef signed char                     TQ3Int8
  41.  
  42. ; typedef unsigned short                 TQ3Uns16
  43.  
  44. ; typedef signed short                     TQ3Int16
  45.  
  46. ; typedef unsigned long                 TQ3Uns32
  47.  
  48. ; typedef signed long                     TQ3Int32
  49.  
  50.     IF TARGET_OS_MAC THEN
  51. TQ3Uns64                RECORD 0
  52. hi                         ds.l    1                ; offset: $0 (0)
  53. lo                         ds.l    1                ; offset: $4 (4)
  54. sizeof                     EQU *                    ; size:   $8 (8)
  55.                         ENDR
  56. TQ3Int64                RECORD 0
  57. hi                         ds.l    1                ; offset: $0 (0)
  58. lo                         ds.l    1                ; offset: $4 (4)
  59. sizeof                     EQU *                    ; size:   $8 (8)
  60.                         ENDR
  61.     ELSE
  62. TQ3Uns64                RECORD 0
  63. lo                         ds.l    1                ; offset: $0 (0)
  64. hi                         ds.l    1                ; offset: $4 (4)
  65. sizeof                     EQU *                    ; size:   $8 (8)
  66.                         ENDR
  67. TQ3Int64                RECORD 0
  68. lo                         ds.l    1                ; offset: $0 (0)
  69. hi                         ds.l    1                ; offset: $4 (4)
  70. sizeof                     EQU *                    ; size:   $8 (8)
  71.                         ENDR
  72.     ENDIF    ; TARGET_OS_MAC
  73. ; typedef float                         TQ3Float32
  74.  
  75. ; typedef double                         TQ3Float64
  76.  
  77. ; typedef TQ3Uns32                         TQ3Size
  78.  
  79. ; ******************************************************************************
  80. ; **                                                                              **
  81. ; **                                    File Types                                 **
  82. ; **                                                                              **
  83. ; ****************************************************************************
  84.  
  85.  
  86. ; typedef long                            TQ3FileModeMasks
  87. kQ3FileModeNormal                EQU        0
  88. kQ3FileModeStream                EQU        $01
  89. kQ3FileModeDatabase                EQU        $02
  90. kQ3FileModeText                    EQU        $04
  91. ; typedef unsigned long                 TQ3FileMode
  92.  
  93. ; ******************************************************************************
  94. ; **                                                                              **
  95. ; **                                    Method Types                             **
  96. ; **                                                                              **
  97. ; ****************************************************************************
  98.  
  99. ; *    IO Methods
  100. ; *
  101. ; *    The IO system treats all objects as groups of typed information.
  102. ; *    When you register your element or attribute, the "elementType" is the 
  103. ; *    binary type of your object, the "elementName" the ascii type.
  104. ; *    
  105. ; *    All objects in the metafile are made up of a "root" or parent object which
  106. ; *    defines the instantiated object type. You may define the format of your 
  107. ; *    data any way you wish as long as you use the primitives types above and the
  108. ; *    routines below.
  109. ; *
  110. ; *    Root Objects are often appended with additional child objects, called 
  111. ; *    subobjects. You may append your object with other QuickDraw 3D objects.
  112. ; *    
  113. ; *    Writing is straightforward: an object traverses itself any other objects 
  114. ; *    that make it up, then writes its own data. Writing uses two methods: 
  115. ; *    TQ3ObjectTraverseMethod and TQ3ObjectWriteMethod.
  116. ; *
  117. ; *    The TQ3ObjectTraverseMethod method should:
  118. ; *    + First, Determine if the data should be written 
  119. ; *        - if you don't want to write out your object after examining your
  120. ; *            data, return kQ3Success in your Traverse method without calling
  121. ; *            any other submit calls.
  122. ; *     + Next, calculate the size of your object on disk
  123. ; *     + Gather whatever state from the view you need to preserve
  124. ; *         - you may access the view state NOW, as the state of the
  125. ; *             view duing your TQ3ObjectWriteMethod will not be valid. You may
  126. ; *             pass a temporary buffer to your write method.
  127. ; *     + Submit your view write data using Q3View_SubmitWriteData
  128. ; *         - note that you MUST call this before any other "_Submit" call.
  129. ; *         - you may pass in a "deleteMethod" for your data. This method
  130. ; *             will be called whether or not your write method succeeds or fails.
  131. ; *     + Submit your subobjects to the view
  132. ; *     
  133. ; *     The TQ3ObjectWriteMethod method should:
  134. ; *     + Write your data format to the file using the primitives routines below.
  135. ; *         - If you passed a "deleteMethod" in your Q3View_SubmitWriteData, that
  136. ; *             method will be called upon exit of your write method.
  137. ; *
  138. ; *    Reading is less straightforward because your root object and
  139. ; *    any subobjects must be read inside of your TQ3ObjectReadDataMethod. There 
  140. ; *    is an implicit state contained in the file while reading, which you must 
  141. ; *    be aware of. When you first enter the read method, you must physically 
  142. ; *    read in your data format using the primitives routines until
  143. ; *    
  144. ; *    Q3File_IsEndOfData(file) == kQ3True
  145. ; *    
  146. ; *    Generally, your data format should be self-descriptive such that you do not
  147. ; *    need to call Q3File_IsEndOfData to determine if you are done reading. 
  148. ; *    However, this call is useful for determining zero-sized object or 
  149. ; *    determining the end of an object's data.
  150. ; *    
  151. ; *    Once you have read in all the data, you may collect subobjects. A metafile
  152. ; *    object ONLY has subobjects if it is in a container. The call
  153. ; *    
  154. ; *    Q3File_IsEndOfContainer(file)
  155. ; *    
  156. ; *    returns kQ3False if subobjects exist, and kQ3True if subobjects do not 
  157. ; *    exist.
  158. ; *    
  159. ; *    At this point, you may use
  160. ; *    
  161. ; *    Q3File_GetNextObjectType
  162. ; *    Q3File_IsNextObjectOfType
  163. ; *    Q3File_ReadObject
  164. ; *    Q3File_SkipObject
  165. ; *    
  166. ; *    to iterate through the subobjects until Q3File_IsEndOfContainer(file) 
  167. ; *    is kQ3True.
  168. ; * 
  169.  
  170. ; *    TQ3ObjectTraverseMethod
  171. ; *
  172. ; *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  173. ; *    object. Sorry, custom objects will be available in the next major revision.
  174. ; *
  175. ; *    The "data" is a pointer to your internal element data.
  176. ; *
  177. ; *    The view is the current traversal view.
  178.  
  179. ; *  Use Q3XView_SubmitWriteData instead...
  180.  
  181. ;
  182. ; extern TQ3Status Q3View_SubmitWriteData(TQ3ViewObject view, TQ3Size size, void *data, TQ3DataDeleteMethod deleteData)
  183. ;
  184.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION Q3View_SubmitWriteData
  186.     ENDIF
  187.  
  188. ; *    TQ3ObjectReadDataMethod
  189. ; *
  190. ; *  For "elements" (meaning "attributes", too), you must allocate stack space 
  191. ; *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  192. ; *
  193. ; *    Otherwise, parentObject is whatever object your element is a subobject of...
  194.  
  195. ; * IO Methods
  196.  
  197.  
  198. kQ3XMethodTypeObjectFileVersion    EQU        'vers'                ; version 
  199. kQ3XMethodTypeObjectTraverse    EQU        'trvs'                ; byte count 
  200. kQ3XMethodTypeObjectTraverseData EQU    'trvd'                ; byte count 
  201. kQ3XMethodTypeObjectWrite        EQU        'writ'                ; Dump info to file 
  202. kQ3XMethodTypeObjectReadData    EQU        'rddt'                ; Read info from file into buffer or, attach read data to parent 
  203. kQ3XMethodTypeObjectRead        EQU        'read'
  204. kQ3XMethodTypeObjectAttach        EQU        'attc'
  205. ; *    TQ3XObjectTraverseMethod
  206. ; *
  207. ; *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  208. ; *    object. Sorry, custom objects will be available in the next major revision.
  209. ; *
  210. ; *    The "data" is a pointer to your internal element data.
  211. ; *
  212. ; *    The view is the current traversal view.
  213.  
  214. ; *  TQ3XObjectTraverseDataMethod
  215.  
  216. ; *  TQ3XObjectWriteMethod
  217.  
  218. ; *  Custom object writing 
  219.  
  220. ;
  221. ; extern TQ3Status Q3XView_SubmitWriteData(TQ3ViewObject view, TQ3Size size, void *data, TQ3XDataDeleteMethod deleteData)
  222. ;
  223.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  224.         IMPORT_CFM_FUNCTION Q3XView_SubmitWriteData
  225.     ENDIF
  226.  
  227. ;
  228. ; extern TQ3Status Q3XView_SubmitSubObjectData(TQ3ViewObject view, TQ3XObjectClass objectClass, unsigned long size, void *data, TQ3XDataDeleteMethod deleteData)
  229. ;
  230.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION Q3XView_SubmitSubObjectData
  232.     ENDIF
  233.  
  234. ; *  TQ3XObjectReadMethod
  235.  
  236. ; *    TQ3XObjectReadDataMethod
  237. ; *
  238. ; *  For "elements" (meaning "attributes", too), you must allocate stack space 
  239. ; *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  240. ; *
  241. ; *    Otherwise, parentObject is whatever object your element is a subobject of...
  242.  
  243. ; *  TQ3XObjectAttachMethod
  244.  
  245.  
  246.  
  247. ; ******************************************************************************
  248. ; **                                                                              **
  249. ; **                                Versioning                                     **
  250. ; **                                                                              **
  251. ; ****************************************************************************
  252.  
  253. ; typedef unsigned long                 TQ3FileVersion
  254.  
  255. ; ******************************************************************************
  256. ; **                                                                              **
  257. ; **                                String Constants                             **
  258. ; **                                                                              **
  259. ; ****************************************************************************
  260.  
  261. ; ******************************************************************************
  262. ; **                                                                              **
  263. ; **                                File Routines                                 **
  264. ; **                                                                              **
  265. ; ****************************************************************************
  266.  
  267. ; * Creation and accessors
  268.  
  269. ;
  270. ; extern TQ3FileObject Q3File_New(void )
  271. ;
  272.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  273.         IMPORT_CFM_FUNCTION Q3File_New
  274.     ENDIF
  275.  
  276. ;
  277. ; extern TQ3Status Q3File_GetStorage(TQ3FileObject theFile, TQ3StorageObject *storage)
  278. ;
  279.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  280.         IMPORT_CFM_FUNCTION Q3File_GetStorage
  281.     ENDIF
  282.  
  283. ;
  284. ; extern TQ3Status Q3File_SetStorage(TQ3FileObject theFile, TQ3StorageObject storage)
  285. ;
  286.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  287.         IMPORT_CFM_FUNCTION Q3File_SetStorage
  288.     ENDIF
  289.  
  290. ; * Opening, and accessing "open" state, closing/cancelling
  291.  
  292. ;
  293. ; extern TQ3Status Q3File_OpenRead(TQ3FileObject theFile, TQ3FileMode *mode)
  294. ;
  295.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION Q3File_OpenRead
  297.     ENDIF
  298.  
  299. ;
  300. ; extern TQ3Status Q3File_OpenWrite(TQ3FileObject theFile, TQ3FileMode mode)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION Q3File_OpenWrite
  304.     ENDIF
  305.  
  306. ;
  307. ; extern TQ3Status Q3File_IsOpen(TQ3FileObject theFile, TQ3Boolean *isOpen)
  308. ;
  309.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  310.         IMPORT_CFM_FUNCTION Q3File_IsOpen
  311.     ENDIF
  312.  
  313. ;
  314. ; extern TQ3Status Q3File_GetMode(TQ3FileObject theFile, TQ3FileMode *mode)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  317.         IMPORT_CFM_FUNCTION Q3File_GetMode
  318.     ENDIF
  319.  
  320. ;
  321. ; extern TQ3Status Q3File_GetVersion(TQ3FileObject theFile, TQ3FileVersion *version)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION Q3File_GetVersion
  325.     ENDIF
  326.  
  327. ;
  328. ; extern TQ3Status Q3File_Close(TQ3FileObject theFile)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  331.         IMPORT_CFM_FUNCTION Q3File_Close
  332.     ENDIF
  333.  
  334. ;
  335. ; extern TQ3Status Q3File_Cancel(TQ3FileObject theFile)
  336. ;
  337.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  338.         IMPORT_CFM_FUNCTION Q3File_Cancel
  339.     ENDIF
  340.  
  341. ; * Writing (Application)
  342.  
  343. ;
  344. ; extern TQ3Status Q3View_StartWriting(TQ3ViewObject view, TQ3FileObject theFile)
  345. ;
  346.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  347.         IMPORT_CFM_FUNCTION Q3View_StartWriting
  348.     ENDIF
  349.  
  350. ;
  351. ; extern TQ3ViewStatus Q3View_EndWriting(TQ3ViewObject view)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  354.         IMPORT_CFM_FUNCTION Q3View_EndWriting
  355.     ENDIF
  356.  
  357. ; * Reading (Application)
  358.  
  359. ;
  360. ; extern TQ3ObjectType Q3File_GetNextObjectType(TQ3FileObject theFile)
  361. ;
  362.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  363.         IMPORT_CFM_FUNCTION Q3File_GetNextObjectType
  364.     ENDIF
  365.  
  366. ;
  367. ; extern TQ3Boolean Q3File_IsNextObjectOfType(TQ3FileObject theFile, TQ3ObjectType ofType)
  368. ;
  369.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  370.         IMPORT_CFM_FUNCTION Q3File_IsNextObjectOfType
  371.     ENDIF
  372.  
  373. ;
  374. ; extern TQ3Object Q3File_ReadObject(TQ3FileObject theFile)
  375. ;
  376.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION Q3File_ReadObject
  378.     ENDIF
  379.  
  380. ;
  381. ; extern TQ3Status Q3File_SkipObject(TQ3FileObject theFile)
  382. ;
  383.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  384.         IMPORT_CFM_FUNCTION Q3File_SkipObject
  385.     ENDIF
  386.  
  387. ;
  388. ; extern TQ3Boolean Q3File_IsEndOfData(TQ3FileObject theFile)
  389. ;
  390.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  391.         IMPORT_CFM_FUNCTION Q3File_IsEndOfData
  392.     ENDIF
  393.  
  394. ;
  395. ; extern TQ3Boolean Q3File_IsEndOfContainer(TQ3FileObject theFile, TQ3Object rootObject)
  396. ;
  397.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  398.         IMPORT_CFM_FUNCTION Q3File_IsEndOfContainer
  399.     ENDIF
  400.  
  401. ;
  402. ; extern TQ3Boolean Q3File_IsEndOfFile(TQ3FileObject theFile)
  403. ;
  404.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  405.         IMPORT_CFM_FUNCTION Q3File_IsEndOfFile
  406.     ENDIF
  407.  
  408. ;     
  409. ; *  External file references
  410.  
  411. ;
  412. ; extern TQ3Status Q3File_MarkAsExternalReference(TQ3FileObject theFile, TQ3SharedObject sharedObject)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION Q3File_MarkAsExternalReference
  416.     ENDIF
  417.  
  418. ;
  419. ; extern TQ3GroupObject Q3File_GetExternalReferences(TQ3FileObject theFile)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION Q3File_GetExternalReferences
  423.     ENDIF
  424.  
  425. ;     
  426. ; *  Tracking editing in read-in objects with custom elements
  427.  
  428. ;
  429. ; extern TQ3Status Q3Shared_ClearEditTracking(TQ3SharedObject sharedObject)
  430. ;
  431.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  432.         IMPORT_CFM_FUNCTION Q3Shared_ClearEditTracking
  433.     ENDIF
  434.  
  435. ;
  436. ; extern TQ3Boolean Q3Shared_GetEditTrackingState(TQ3SharedObject sharedObject)
  437. ;
  438.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  439.         IMPORT_CFM_FUNCTION Q3Shared_GetEditTrackingState
  440.     ENDIF
  441.  
  442. ;     
  443. ; *  Reading objects inside a group one-by-one
  444.  
  445.  
  446. ; typedef long                            TQ3FileReadGroupStateMasks
  447. kQ3FileReadWholeGroup            EQU        0
  448. kQ3FileReadObjectsInGroup        EQU        $01
  449. kQ3FileCurrentlyInsideGroup        EQU        $02
  450. ; typedef unsigned long                 TQ3FileReadGroupState
  451.  
  452. ;
  453. ; extern TQ3Status Q3File_SetReadInGroup(TQ3FileObject theFile, TQ3FileReadGroupState readGroupState)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  456.         IMPORT_CFM_FUNCTION Q3File_SetReadInGroup
  457.     ENDIF
  458.  
  459. ;
  460. ; extern TQ3Status Q3File_GetReadInGroup(TQ3FileObject theFile, TQ3FileReadGroupState *readGroupState)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  463.         IMPORT_CFM_FUNCTION Q3File_GetReadInGroup
  464.     ENDIF
  465.  
  466.  
  467. ; * Idling
  468.  
  469. ;
  470. ; extern TQ3Status Q3File_SetIdleMethod(TQ3FileObject theFile, TQ3FileIdleMethod idle, const void *idleData)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  473.         IMPORT_CFM_FUNCTION Q3File_SetIdleMethod
  474.     ENDIF
  475.  
  476.  
  477. ; ******************************************************************************
  478. ; **                                                                              **
  479. ; **                                Primitives Routines                             **
  480. ; **                                                                              **
  481. ; ****************************************************************************
  482.  
  483. ;
  484. ; extern TQ3Status Q3NewLine_Write(TQ3FileObject theFile)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  487.         IMPORT_CFM_FUNCTION Q3NewLine_Write
  488.     ENDIF
  489.  
  490. ;
  491. ; extern TQ3Status Q3Uns8_Read(TQ3Uns8 *data, TQ3FileObject theFile)
  492. ;
  493.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  494.         IMPORT_CFM_FUNCTION Q3Uns8_Read
  495.     ENDIF
  496.  
  497. ;
  498. ; extern TQ3Status Q3Uns8_Write(TQ3Uns8 data, TQ3FileObject theFile)
  499. ;
  500.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  501.         IMPORT_CFM_FUNCTION Q3Uns8_Write
  502.     ENDIF
  503.  
  504. ;
  505. ; extern TQ3Status Q3Uns16_Read(TQ3Uns16 *data, TQ3FileObject theFile)
  506. ;
  507.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  508.         IMPORT_CFM_FUNCTION Q3Uns16_Read
  509.     ENDIF
  510.  
  511. ;
  512. ; extern TQ3Status Q3Uns16_Write(TQ3Uns16 data, TQ3FileObject theFile)
  513. ;
  514.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  515.         IMPORT_CFM_FUNCTION Q3Uns16_Write
  516.     ENDIF
  517.  
  518. ;
  519. ; extern TQ3Status Q3Uns32_Read(TQ3Uns32 *data, TQ3FileObject theFile)
  520. ;
  521.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  522.         IMPORT_CFM_FUNCTION Q3Uns32_Read
  523.     ENDIF
  524.  
  525. ;
  526. ; extern TQ3Status Q3Uns32_Write(TQ3Uns32 data, TQ3FileObject theFile)
  527. ;
  528.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  529.         IMPORT_CFM_FUNCTION Q3Uns32_Write
  530.     ENDIF
  531.  
  532. ;
  533. ; extern TQ3Status Q3Int8_Read(TQ3Int8 *data, TQ3FileObject theFile)
  534. ;
  535.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  536.         IMPORT_CFM_FUNCTION Q3Int8_Read
  537.     ENDIF
  538.  
  539. ;
  540. ; extern TQ3Status Q3Int8_Write(TQ3Int8 data, TQ3FileObject theFile)
  541. ;
  542.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  543.         IMPORT_CFM_FUNCTION Q3Int8_Write
  544.     ENDIF
  545.  
  546. ;
  547. ; extern TQ3Status Q3Int16_Read(TQ3Int16 *data, TQ3FileObject theFile)
  548. ;
  549.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  550.         IMPORT_CFM_FUNCTION Q3Int16_Read
  551.     ENDIF
  552.  
  553. ;
  554. ; extern TQ3Status Q3Int16_Write(TQ3Int16 data, TQ3FileObject theFile)
  555. ;
  556.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION Q3Int16_Write
  558.     ENDIF
  559.  
  560. ;
  561. ; extern TQ3Status Q3Int32_Read(TQ3Int32 *data, TQ3FileObject theFile)
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  564.         IMPORT_CFM_FUNCTION Q3Int32_Read
  565.     ENDIF
  566.  
  567. ;
  568. ; extern TQ3Status Q3Int32_Write(TQ3Int32 data, TQ3FileObject theFile)
  569. ;
  570.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  571.         IMPORT_CFM_FUNCTION Q3Int32_Write
  572.     ENDIF
  573.  
  574. ;
  575. ; extern TQ3Status Q3Uns64_Read(TQ3Uns64 *data, TQ3FileObject theFile)
  576. ;
  577.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  578.         IMPORT_CFM_FUNCTION Q3Uns64_Read
  579.     ENDIF
  580.  
  581. ;
  582. ; extern TQ3Status Q3Uns64_Write(TQ3Uns64 data, TQ3FileObject theFile)
  583. ;
  584.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  585.         IMPORT_CFM_FUNCTION Q3Uns64_Write
  586.     ENDIF
  587.  
  588. ;
  589. ; extern TQ3Status Q3Int64_Read(TQ3Int64 *data, TQ3FileObject theFile)
  590. ;
  591.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  592.         IMPORT_CFM_FUNCTION Q3Int64_Read
  593.     ENDIF
  594.  
  595. ;
  596. ; extern TQ3Status Q3Int64_Write(TQ3Int64 data, TQ3FileObject theFile)
  597. ;
  598.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION Q3Int64_Write
  600.     ENDIF
  601.  
  602. ;
  603. ; extern TQ3Status Q3Float32_Read(TQ3Float32 *data, TQ3FileObject theFile)
  604. ;
  605.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  606.         IMPORT_CFM_FUNCTION Q3Float32_Read
  607.     ENDIF
  608.  
  609. ;
  610. ; extern TQ3Status Q3Float32_Write(TQ3Float32 data, TQ3FileObject theFile)
  611. ;
  612.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  613.         IMPORT_CFM_FUNCTION Q3Float32_Write
  614.     ENDIF
  615.  
  616. ;
  617. ; extern TQ3Status Q3Float64_Read(TQ3Float64 *data, TQ3FileObject theFile)
  618. ;
  619.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  620.         IMPORT_CFM_FUNCTION Q3Float64_Read
  621.     ENDIF
  622.  
  623. ;
  624. ; extern TQ3Status Q3Float64_Write(TQ3Float64 data, TQ3FileObject theFile)
  625. ;
  626.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION Q3Float64_Write
  628.     ENDIF
  629.  
  630. ;
  631. ; extern TQ3Size Q3Size_Pad(TQ3Size size)
  632. ;
  633.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  634.         IMPORT_CFM_FUNCTION Q3Size_Pad
  635.     ENDIF
  636.  
  637. ; * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
  638.  
  639. ;
  640. ; extern TQ3Status Q3String_Read(char *data, unsigned long *length, TQ3FileObject theFile)
  641. ;
  642.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  643.         IMPORT_CFM_FUNCTION Q3String_Read
  644.     ENDIF
  645.  
  646. ;
  647. ; extern TQ3Status Q3String_Write(const char *data, TQ3FileObject theFile)
  648. ;
  649.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  650.         IMPORT_CFM_FUNCTION Q3String_Write
  651.     ENDIF
  652.  
  653. ;  
  654. ; * This call will read Q3Size_Pad(size) bytes,
  655. ; *    but only place size bytes into data.
  656.  
  657. ;
  658. ; extern TQ3Status Q3RawData_Read(unsigned char *data, unsigned long size, TQ3FileObject theFile)
  659. ;
  660.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  661.         IMPORT_CFM_FUNCTION Q3RawData_Read
  662.     ENDIF
  663.  
  664. ;  
  665. ; * This call will write Q3Size_Pad(size) bytes,
  666. ; *    adding 0's to pad to the nearest 4 byte boundary.
  667.  
  668. ;
  669. ; extern TQ3Status Q3RawData_Write(const unsigned char *data, unsigned long size, TQ3FileObject theFile)
  670. ;
  671.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  672.         IMPORT_CFM_FUNCTION Q3RawData_Write
  673.     ENDIF
  674.  
  675. ; ******************************************************************************
  676. ; **                                                                              **
  677. ; **                        Convenient Primitives Routines                         **
  678. ; **                                                                              **
  679. ; ****************************************************************************
  680.  
  681. ;
  682. ; extern TQ3Status Q3Point2D_Read(TQ3Point2D *point2D, TQ3FileObject theFile)
  683. ;
  684.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  685.         IMPORT_CFM_FUNCTION Q3Point2D_Read
  686.     ENDIF
  687.  
  688. ;
  689. ; extern TQ3Status Q3Point2D_Write(const TQ3Point2D *point2D, TQ3FileObject theFile)
  690. ;
  691.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  692.         IMPORT_CFM_FUNCTION Q3Point2D_Write
  693.     ENDIF
  694.  
  695. ;
  696. ; extern TQ3Status Q3Point3D_Read(TQ3Point3D *point3D, TQ3FileObject theFile)
  697. ;
  698.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION Q3Point3D_Read
  700.     ENDIF
  701.  
  702. ;
  703. ; extern TQ3Status Q3Point3D_Write(const TQ3Point3D *point3D, TQ3FileObject theFile)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  706.         IMPORT_CFM_FUNCTION Q3Point3D_Write
  707.     ENDIF
  708.  
  709. ;
  710. ; extern TQ3Status Q3RationalPoint3D_Read(TQ3RationalPoint3D *point3D, TQ3FileObject theFile)
  711. ;
  712.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  713.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Read
  714.     ENDIF
  715.  
  716. ;
  717. ; extern TQ3Status Q3RationalPoint3D_Write(const TQ3RationalPoint3D *point3D, TQ3FileObject theFile)
  718. ;
  719.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  720.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Write
  721.     ENDIF
  722.  
  723. ;
  724. ; extern TQ3Status Q3RationalPoint4D_Read(TQ3RationalPoint4D *point4D, TQ3FileObject theFile)
  725. ;
  726.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  727.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Read
  728.     ENDIF
  729.  
  730. ;
  731. ; extern TQ3Status Q3RationalPoint4D_Write(const TQ3RationalPoint4D *point4D, TQ3FileObject theFile)
  732. ;
  733.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  734.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Write
  735.     ENDIF
  736.  
  737. ;
  738. ; extern TQ3Status Q3Vector2D_Read(TQ3Vector2D *vector2D, TQ3FileObject theFile)
  739. ;
  740.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  741.         IMPORT_CFM_FUNCTION Q3Vector2D_Read
  742.     ENDIF
  743.  
  744. ;
  745. ; extern TQ3Status Q3Vector2D_Write(const TQ3Vector2D *vector2D, TQ3FileObject theFile)
  746. ;
  747.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  748.         IMPORT_CFM_FUNCTION Q3Vector2D_Write
  749.     ENDIF
  750.  
  751. ;
  752. ; extern TQ3Status Q3Vector3D_Read(TQ3Vector3D *vector3D, TQ3FileObject theFile)
  753. ;
  754.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  755.         IMPORT_CFM_FUNCTION Q3Vector3D_Read
  756.     ENDIF
  757.  
  758. ;
  759. ; extern TQ3Status Q3Vector3D_Write(const TQ3Vector3D *vector3D, TQ3FileObject theFile)
  760. ;
  761.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  762.         IMPORT_CFM_FUNCTION Q3Vector3D_Write
  763.     ENDIF
  764.  
  765. ;
  766. ; extern TQ3Status Q3Matrix4x4_Read(TQ3Matrix4x4 *matrix4x4, TQ3FileObject theFile)
  767. ;
  768.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  769.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Read
  770.     ENDIF
  771.  
  772. ;
  773. ; extern TQ3Status Q3Matrix4x4_Write(const TQ3Matrix4x4 *matrix4x4, TQ3FileObject theFile)
  774. ;
  775.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  776.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Write
  777.     ENDIF
  778.  
  779. ;
  780. ; extern TQ3Status Q3Tangent2D_Read(TQ3Tangent2D *tangent2D, TQ3FileObject theFile)
  781. ;
  782.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  783.         IMPORT_CFM_FUNCTION Q3Tangent2D_Read
  784.     ENDIF
  785.  
  786. ;
  787. ; extern TQ3Status Q3Tangent2D_Write(const TQ3Tangent2D *tangent2D, TQ3FileObject theFile)
  788. ;
  789.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION Q3Tangent2D_Write
  791.     ENDIF
  792.  
  793. ;
  794. ; extern TQ3Status Q3Tangent3D_Read(TQ3Tangent3D *tangent3D, TQ3FileObject theFile)
  795. ;
  796.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  797.         IMPORT_CFM_FUNCTION Q3Tangent3D_Read
  798.     ENDIF
  799.  
  800. ;
  801. ; extern TQ3Status Q3Tangent3D_Write(const TQ3Tangent3D *tangent3D, TQ3FileObject theFile)
  802. ;
  803.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  804.         IMPORT_CFM_FUNCTION Q3Tangent3D_Write
  805.     ENDIF
  806.  
  807. ;     This call affects only text Files - it is a no-op in binary files 
  808. ;
  809. ; extern TQ3Status Q3Comment_Write(char *comment, TQ3FileObject theFile)
  810. ;
  811.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  812.         IMPORT_CFM_FUNCTION Q3Comment_Write
  813.     ENDIF
  814.  
  815. ; ******************************************************************************
  816. ; **                                                                              **
  817. ; **                                Unknown Object                                 **
  818. ; **                                                                              **
  819. ; **        Unknown objects are generated when reading files which contain         **
  820. ; **        custom data which has not been registered in the current             **
  821. ; **        instantiation of QuickDraw 3D.                                         **
  822. ; **                                                                              **
  823. ; ****************************************************************************
  824.  
  825. ;
  826. ; extern TQ3ObjectType Q3Unknown_GetType(TQ3UnknownObject unknownObject)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION Q3Unknown_GetType
  830.     ENDIF
  831.  
  832. ;
  833. ; extern TQ3Status Q3Unknown_GetDirtyState(TQ3UnknownObject unknownObject, TQ3Boolean *isDirty)
  834. ;
  835.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  836.         IMPORT_CFM_FUNCTION Q3Unknown_GetDirtyState
  837.     ENDIF
  838.  
  839. ;
  840. ; extern TQ3Status Q3Unknown_SetDirtyState(TQ3UnknownObject unknownObject, TQ3Boolean isDirty)
  841. ;
  842.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  843.         IMPORT_CFM_FUNCTION Q3Unknown_SetDirtyState
  844.     ENDIF
  845.  
  846.  
  847. ; ******************************************************************************
  848. ; **                                                                              **
  849. ; **                            Unknown Text Routines                             **
  850. ; **                                                                              **
  851. ; ****************************************************************************
  852.  
  853. TQ3UnknownTextData        RECORD 0
  854. objectName                 ds.l    1                ; offset: $0 (0)        ;  '\0' terminated 
  855. contents                 ds.l    1                ; offset: $4 (4)        ;  '\0' terminated 
  856. sizeof                     EQU *                    ; size:   $8 (8)
  857.                         ENDR
  858. ;
  859. ; extern TQ3Status Q3UnknownText_GetData(TQ3UnknownObject unknownObject, TQ3UnknownTextData *unknownTextData)
  860. ;
  861.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  862.         IMPORT_CFM_FUNCTION Q3UnknownText_GetData
  863.     ENDIF
  864.  
  865. ;
  866. ; extern TQ3Status Q3UnknownText_EmptyData(TQ3UnknownTextData *unknownTextData)
  867. ;
  868.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  869.         IMPORT_CFM_FUNCTION Q3UnknownText_EmptyData
  870.     ENDIF
  871.  
  872.  
  873. ; ******************************************************************************
  874. ; **                                                                              **
  875. ; **                            Unknown Binary Routines                             **
  876. ; **                                                                              **
  877. ; ****************************************************************************
  878.  
  879. TQ3UnknownBinaryData    RECORD 0
  880. objectType                 ds.l    1                ; offset: $0 (0)
  881. size                     ds.l    1                ; offset: $4 (4)
  882. byteOrder                 ds.l    1                ; offset: $8 (8)
  883. contents                 ds.l    1                ; offset: $C (12)
  884. sizeof                     EQU *                    ; size:   $10 (16)
  885.                         ENDR
  886. ;
  887. ; extern TQ3Status Q3UnknownBinary_GetData(TQ3UnknownObject unknownObject, TQ3UnknownBinaryData *unknownBinaryData)
  888. ;
  889.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  890.         IMPORT_CFM_FUNCTION Q3UnknownBinary_GetData
  891.     ENDIF
  892.  
  893. ;
  894. ; extern TQ3Status Q3UnknownBinary_EmptyData(TQ3UnknownBinaryData *unknownBinaryData)
  895. ;
  896.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  897.         IMPORT_CFM_FUNCTION Q3UnknownBinary_EmptyData
  898.     ENDIF
  899.  
  900.  
  901. ;
  902. ; extern TQ3Status Q3UnknownBinary_GetTypeString(TQ3UnknownObject unknownObject, char **typeString)
  903. ;
  904.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  905.         IMPORT_CFM_FUNCTION Q3UnknownBinary_GetTypeString
  906.     ENDIF
  907.  
  908. ;
  909. ; extern TQ3Status Q3UnknownBinary_EmptyTypeString(char **typeString)
  910. ;
  911.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  912.         IMPORT_CFM_FUNCTION Q3UnknownBinary_EmptyTypeString
  913.     ENDIF
  914.  
  915. ; ******************************************************************************
  916. ; **                                                                              **
  917. ; **                            ViewHints routines                                 **
  918. ; **                                                                              **
  919. ; **        ViewHints are an object in a metafile to give you some hints on how     **
  920. ; **        to render a scene.    You may create a view with any of the objects     **
  921. ; **        retrieved from it, or you can just throw it away.                     **
  922. ; **                                                                              **
  923. ; **        To write a view hints to a file, create a view hints object from a     **
  924. ; **        view and write the view hints.                                         **
  925. ; **                                                                              **
  926. ; ****************************************************************************
  927.  
  928. ;
  929. ; extern TQ3ViewHintsObject Q3ViewHints_New(TQ3ViewObject view)
  930. ;
  931.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  932.         IMPORT_CFM_FUNCTION Q3ViewHints_New
  933.     ENDIF
  934.  
  935. ;
  936. ; extern TQ3Status Q3ViewHints_SetRenderer(TQ3ViewHintsObject viewHints, TQ3RendererObject renderer)
  937. ;
  938.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  939.         IMPORT_CFM_FUNCTION Q3ViewHints_SetRenderer
  940.     ENDIF
  941.  
  942. ;
  943. ; extern TQ3Status Q3ViewHints_GetRenderer(TQ3ViewHintsObject viewHints, TQ3RendererObject *renderer)
  944. ;
  945.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  946.         IMPORT_CFM_FUNCTION Q3ViewHints_GetRenderer
  947.     ENDIF
  948.  
  949. ;
  950. ; extern TQ3Status Q3ViewHints_SetCamera(TQ3ViewHintsObject viewHints, TQ3CameraObject camera)
  951. ;
  952.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  953.         IMPORT_CFM_FUNCTION Q3ViewHints_SetCamera
  954.     ENDIF
  955.  
  956. ;
  957. ; extern TQ3Status Q3ViewHints_GetCamera(TQ3ViewHintsObject viewHints, TQ3CameraObject *camera)
  958. ;
  959.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  960.         IMPORT_CFM_FUNCTION Q3ViewHints_GetCamera
  961.     ENDIF
  962.  
  963. ;
  964. ; extern TQ3Status Q3ViewHints_SetLightGroup(TQ3ViewHintsObject viewHints, TQ3GroupObject lightGroup)
  965. ;
  966.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  967.         IMPORT_CFM_FUNCTION Q3ViewHints_SetLightGroup
  968.     ENDIF
  969.  
  970. ;
  971. ; extern TQ3Status Q3ViewHints_GetLightGroup(TQ3ViewHintsObject viewHints, TQ3GroupObject *lightGroup)
  972. ;
  973.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  974.         IMPORT_CFM_FUNCTION Q3ViewHints_GetLightGroup
  975.     ENDIF
  976.  
  977. ;
  978. ; extern TQ3Status Q3ViewHints_SetAttributeSet(TQ3ViewHintsObject viewHints, TQ3AttributeSet attributeSet)
  979. ;
  980.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  981.         IMPORT_CFM_FUNCTION Q3ViewHints_SetAttributeSet
  982.     ENDIF
  983.  
  984. ;
  985. ; extern TQ3Status Q3ViewHints_GetAttributeSet(TQ3ViewHintsObject viewHints, TQ3AttributeSet *attributeSet)
  986. ;
  987.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  988.         IMPORT_CFM_FUNCTION Q3ViewHints_GetAttributeSet
  989.     ENDIF
  990.  
  991. ;
  992. ; extern TQ3Status Q3ViewHints_SetDimensionsState(TQ3ViewHintsObject viewHints, TQ3Boolean isValid)
  993. ;
  994.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  995.         IMPORT_CFM_FUNCTION Q3ViewHints_SetDimensionsState
  996.     ENDIF
  997.  
  998. ;
  999. ; extern TQ3Status Q3ViewHints_GetDimensionsState(TQ3ViewHintsObject viewHints, TQ3Boolean *isValid)
  1000. ;
  1001.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1002.         IMPORT_CFM_FUNCTION Q3ViewHints_GetDimensionsState
  1003.     ENDIF
  1004.  
  1005. ;
  1006. ; extern TQ3Status Q3ViewHints_SetDimensions(TQ3ViewHintsObject viewHints, unsigned long width, unsigned long height)
  1007. ;
  1008.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1009.         IMPORT_CFM_FUNCTION Q3ViewHints_SetDimensions
  1010.     ENDIF
  1011.  
  1012. ;
  1013. ; extern TQ3Status Q3ViewHints_GetDimensions(TQ3ViewHintsObject viewHints, unsigned long *width, unsigned long *height)
  1014. ;
  1015.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1016.         IMPORT_CFM_FUNCTION Q3ViewHints_GetDimensions
  1017.     ENDIF
  1018.  
  1019. ;
  1020. ; extern TQ3Status Q3ViewHints_SetMaskState(TQ3ViewHintsObject viewHints, TQ3Boolean isValid)
  1021. ;
  1022.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1023.         IMPORT_CFM_FUNCTION Q3ViewHints_SetMaskState
  1024.     ENDIF
  1025.  
  1026. ;
  1027. ; extern TQ3Status Q3ViewHints_GetMaskState(TQ3ViewHintsObject viewHints, TQ3Boolean *isValid)
  1028. ;
  1029.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1030.         IMPORT_CFM_FUNCTION Q3ViewHints_GetMaskState
  1031.     ENDIF
  1032.  
  1033. ;
  1034. ; extern TQ3Status Q3ViewHints_SetMask(TQ3ViewHintsObject viewHints, const TQ3Bitmap *mask)
  1035. ;
  1036.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1037.         IMPORT_CFM_FUNCTION Q3ViewHints_SetMask
  1038.     ENDIF
  1039.  
  1040. ;
  1041. ; extern TQ3Status Q3ViewHints_GetMask(TQ3ViewHintsObject viewHints, TQ3Bitmap *mask)
  1042. ;
  1043.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1044.         IMPORT_CFM_FUNCTION Q3ViewHints_GetMask
  1045.     ENDIF
  1046.  
  1047. ;  Call Q3Bitmap_Empty when done with the mask    
  1048. ;
  1049. ; extern TQ3Status Q3ViewHints_SetClearImageMethod(TQ3ViewHintsObject viewHints, TQ3DrawContextClearImageMethod clearMethod)
  1050. ;
  1051.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1052.         IMPORT_CFM_FUNCTION Q3ViewHints_SetClearImageMethod
  1053.     ENDIF
  1054.  
  1055. ;
  1056. ; extern TQ3Status Q3ViewHints_GetClearImageMethod(TQ3ViewHintsObject viewHints, TQ3DrawContextClearImageMethod *clearMethod)
  1057. ;
  1058.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1059.         IMPORT_CFM_FUNCTION Q3ViewHints_GetClearImageMethod
  1060.     ENDIF
  1061.  
  1062. ;
  1063. ; extern TQ3Status Q3ViewHints_SetClearImageColor(TQ3ViewHintsObject viewHints, const TQ3ColorARGB *color)
  1064. ;
  1065.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1066.         IMPORT_CFM_FUNCTION Q3ViewHints_SetClearImageColor
  1067.     ENDIF
  1068.  
  1069. ;
  1070. ; extern TQ3Status Q3ViewHints_GetClearImageColor(TQ3ViewHintsObject viewHints, TQ3ColorARGB *color)
  1071. ;
  1072.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1073.         IMPORT_CFM_FUNCTION Q3ViewHints_GetClearImageColor
  1074.     ENDIF
  1075.  
  1076.  
  1077.  
  1078.     ENDIF ; __QD3DIO__ 
  1079.  
  1080.